package cn.tedu.tmall.admin.mall.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class MallGoodsAddParam implements Serializable {
    @ApiModelProperty(value = "商品分类id",required = true,dataType = "Long")
    @NotNull(message = "分类id不得为空")
    Long categoryId;

    @ApiModelProperty(value = "商品标题",required = true,dataType = "String")
    @NotBlank(message = "商品标题不得为空")
    String title;

    @ApiModelProperty(value = "商品详情",required = true,dataType = "String")
    @NotBlank(message = "商品详情不得为空")
    String detail;

    @ApiModelProperty(value = "商品售价",required = true,dataType = "Double")
    @NotNull(message = "商品售价不得为空")
    Double salePrice;

    @ApiModelProperty(value = "是否推荐",required = true,dataType = "Integer")
    @NotNull(message = "是否推荐不得为空")
    Integer isRecommend;

    @ApiModelProperty(value = "是否上架",required = true,dataType = "Integer")
    @NotNull(message = "是否上架不得为空")
    Integer isPutOn;
}
